A complete documentation on screen scrolling fo rthe vertical areas.

20 5A C9: 

1) Check if $68=82, 84
2) Condition for the bottom of the screen to stop scrolling.
3) Call for storage in $0A, $0B, and $65 from a table at 0x3CA30:
   C0 FF 00 for 00.

***************************************************************************
   
20 3E CA:

1) 20 5A c9 (see above)
2) First checks to see if 65=00, then if 01. If 02, code branches 
   to a small bit of code before hitting an RTS. On an immediate 
   LDY, the code will branch when Y is 00 (Z=01).

---------------------------------------------------------------------------
If $65=01...

1) $0A and $0B load into $58 and $56, in some way, depending on player position.
2) some check to see if A=F0, it'll usually pass it.
3) Condition for bottom of the screen to stop scrolling, then a JMP.

If $65=00...

Ah, I see. There's a condition for the top of the screen to stop scrolling, and 
another to decrease $57 (the screen page).

These are commands to increase and decrease $56, $57, and $58 accordingly.
---------------------------------------------------------------------------

3) Branch if $17 has value, and apparently it usually doesn't. Then, a similar 
   branch, this one involving a comparison with $56 to $66. It looks like $66 
   must not be F8 more (Yes, carry flag is set) than $56 (e.g. 08 less).
4) $56+#F8 is stored into $66. This might mean the screen catches up with the 
   player (or something, not exactly sure). Not even sure if $56 scrolls 08 at 
   a time even.
5) And here we go again, another $65 check. If =00, 59 and 5B are changed. If=01, 
   then it is 5A and 5C that are changed. Two different scrolling indicators, 
   bringing up two very different pages of graphics. Ideally, there should only 
   be one scrolling indicator. When one is an indicator, the other is locked.
   #80 and #81 ($68) are both different in terms of how screen scrolling is 
   programmed, possibly.